package com.jlkf.controller;



import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.jlkf.service.MessageService;
import com.platform.server.response.response.pojo.ReturnData;

@Controller
@RequestMapping(value="message")
public class MessageController{
 
	@Autowired
	private MessageService messageService;
	
	 @ResponseBody
	 @RequestMapping(value="messageList")
	 public ReturnData messageList(Long userId,Integer type,Integer pageSize,Integer pageNumber){
		 
		 return messageService.messageList(userId,type,pageSize,pageNumber);
	 }

	@ResponseBody
	@RequestMapping(value="dailySign")
	public ReturnData dailySign(Long userId){
		
		return messageService.dailySign(userId);
	}
	
	@ResponseBody
	@RequestMapping(value="isSign")
	public ReturnData isSign(Long userId){
		
		return messageService.isSign(userId);
	}
	
	 
	@RequestMapping(value="signList")
	@ResponseBody
	public ReturnData  signList(Long userId,String month,Integer pageSize,Integer pageNumber){
                                          
		return messageService.signList(userId,month,pageSize,pageNumber);
	}
	
	/**
	 * 删除消息
	 */
	@RequestMapping(value="deleteMessage")
	@ResponseBody
	public ReturnData deleteMessage(Long mId){
		return messageService.deleteMessage(mId);
	}	
	
	/**
	 * 不同类型最新数据
	 * @param userId
	 * @return
	 */
    @ResponseBody
    @RequestMapping(value="messageByGroup")
    public ReturnData messageList(Long userId){
	 
	    return messageService.messageByGroup(userId);
    }

}
